/*
 * @Author: caoxiang caoxiang@huaqinits.com
 * @Date: 2022-11-10 17:35:04
 * @LastEditors: caoxiang caoxiang@huaqinits.com
 * @LastEditTime: 2023-02-16 09:41:56
 * @FilePath: \admin-web\src\services\helpCenter.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import {
  request,
  METHOD
} from '@/utils/request'

const BASE_URL = process.env.VUE_APP_API_URL

export async function uploadImg (params) {
  return request(`${BASE_URL}/sys/admin/issues/uploadImage`, METHOD.POST, params)
}
// 帮助中心分类列表

export async function helpCenterClassfy () {
  return request(`${BASE_URL}/sys/admin/issueCategories`, METHOD.GET)
}
// 帮助中心列表
export async function helpCenterList (params) {
  return request(`${BASE_URL}/sys/admin/issues`, METHOD.GET, params)
}

// 帮助中心上下架
export async function upDownItem (id) {
  return request(`${BASE_URL}/sys/admin/issues/${id}/onlineOrOffline`, METHOD.POST)
}

// 帮助中心列表删除
export async function deleteItem (id) {
  return request(`${BASE_URL}/sys/admin/issues/${id}`, METHOD.DELETE)
}
// 新增帮助
export async function addHelpItem (params) {
  return request(`${BASE_URL}/sys/admin/issues`, METHOD.POST, params)
}
// 帮助详情
export async function addHelpItemDetail (id) {
  return request(`${BASE_URL}/sys/admin/issues/${id}`, METHOD.GET)
}
// 帮助中心编辑
export async function editHelpItemDetail (id, params) {
  return request(`${BASE_URL}/sys/admin/issues/${id}`, METHOD.PUT, params)
}

// 客服-定位异常提醒-一键已读
export async function readAll (params) {
  return request(`${BASE_URL}/statistical/admin/vehicleException/read`, METHOD.POST, params)
}

// 分页查询服务费扣款明细
export async function serviceFeeDeduction (params) {
  return request(`${BASE_URL}/order/admin/serviceFeeDeduction`, METHOD.GET, params)
}

// 服务费扣款失败金额统计
export async function failedAmount () {
  return request(`${BASE_URL}/order/admin/serviceFeeDeduction/deduction/failedAmount`, METHOD.GET)
}

// 客服-未解冻押金-未解冻订单
export async function unfrozenDepositList (params) {
  return request(`${BASE_URL}/order/admin/vehicleOrder/unfrozenDepositList`, METHOD.POST, params)
}

// 客服-未解冻押金-未解冻订单详情
export async function unfrozenDepositDetail (orderId) {
  return request(`${BASE_URL}/order/admin/vehicleOrder/unfrozenDepositDetail/${orderId}`, METHOD.POST)
}
// 短信发送记录
export async function sysSendMessage (data) {
  return request(`${BASE_URL}/message/admin/batchMessage/pageList`, METHOD.GET, data)
}

// 客服-互助信息审核-列表 1.5.9
export async function resourceHelpList (params) {
  return request(`${BASE_URL}/business/admin/resourceHelp/list`, METHOD.GET, params)
}

// 客服-互助信息审核-详情 1.5.9
export async function resourceHelpDetail (id) {
  return request(`${BASE_URL}/business/admin/resourceHelp/${id}`, METHOD.GET)
}

// 客服-互助信息审核-审核 1.5.9
export async function resourceHelpAudit (data) {
  return request(`${BASE_URL}/business/admin/resourceHelp/audit`, METHOD.POST, data)
}

// 客服-互助信息审核-下架 1.5.9
export async function resourceHelpOffShelf (id, params) {
  return request(`${BASE_URL}/business/admin/resourceHelp/offShelf/${id}`, METHOD.PUT, params)
}

// 客服-互助信息审核-上架 1.5.9
export async function resourceHelpOnShelf (id) {
  return request(`${BASE_URL}/business/admin/resourceHelp/onShelf/${id}`, METHOD.PUT)
}

// 客服-互助信息审核-解决 1.5.9
export async function resourceHelpResolved (id) {
  return request(`${BASE_URL}/business/admin/resourceHelp/resolved/${id}`, METHOD.PUT)
}
